package util;

import model.MoodleCategory;

/**
 * Util class that incorporates MoodleCategory object will be deleted and a new parent MoodleCategory object for
 * subcategories of deleted category (in case non-recursive deleting).
 * For recursive deleting MoodleCategoryToDelete instance is the parent category that will be deleted.
 * 
 * @author UNI\kgp
 */
public class MoodleCategoryToDelete {

    private MoodleCategory categoryToDelete;
    private MoodleCategory newParentCategory;
    private boolean isRecursiveDelete;

    public MoodleCategoryToDelete(MoodleCategory categoryToDelete, boolean isRecursiveDelete) {
        this.categoryToDelete = categoryToDelete;
        this.isRecursiveDelete = isRecursiveDelete;
    }

    public MoodleCategoryToDelete(MoodleCategory categoryToDelete, MoodleCategory newParentCategory, boolean isRecursiveDelete) {
        this.categoryToDelete = categoryToDelete;
        this.newParentCategory = newParentCategory;
        this.isRecursiveDelete = isRecursiveDelete;
    }

    public MoodleCategory getCategoryToDelete() {
        return categoryToDelete;
    }

    public void setCategoryToDelete(MoodleCategory categoryToDelete) {
        this.categoryToDelete = categoryToDelete;
    }

    public MoodleCategory getNewParentCategory() {
        return newParentCategory;
    }

    public void setNewParentCategory(MoodleCategory newParentCategory) {
        this.newParentCategory = newParentCategory;
    }

    public boolean isRecursiveDelete() {
        return isRecursiveDelete;
    }

    public void setIsRecursiveDelete(boolean isRecursiveDelete) {
        this.isRecursiveDelete = isRecursiveDelete;
    }
}
